import java.util.*;

/**
 * This program finds two neighbouring numbers 
 * in an array entered by a user
 * with the smallest distance to each other
 * @version 0.01 2014-01-10
 * @author Sergii Koziumynskyi
 */

public class NeighbouringNumbers
{
	public static void main(String[] args)
	{
    // preparations
      // ask user about values
      Scanner in = new Scanner(System.in);
      System.out.println("Specify several numbers space separated (in '4 5 8 3 9' format)");

      // store the input and convert it to an array of strings
      String tmp = in.nextLine().trim();
      String[] arrTmp = tmp.split(" ");

      // try to convert the array of strings to an array of integers
      int[] arr = new int[arrTmp.length];
      boolean invalidInput = false;
      
      for (int i = 0; i < arrTmp.length; i++) {
        try{
            arr[i] = Integer.parseInt(arrTmp[i]);
          } catch (NumberFormatException nfe) {
            System.out.println("Entered '" + arrTmp[i] + "' is not an integer value.");
            invalidInput = true;
          };
      }

    // main part
      // check input
      if (invalidInput) {
        System.out.println("Invalid Input. Execution is terminated.");
      } else if (arr.length < 2) {
        System.out.println("Specify more that one number. Execution is terminated.");

      // perform required calculations if input is valid
      } else {

        long minDifference = 5000000000L; // will contain min difference 
        int index = -1; // will contain index of a value with min difference
        long tmp1, tmp2; // used to store intermediate calculations
        
        for (int i = 0; i < arr.length - 1; i++) {
          tmp1 = arr[i] - arr[++i];
            // a question: why tmp1 == 1 instead of expected -4 294 967 295
              // in case of boundary values -2 147 483 648 (arr[i]) - 2 147 483 647 (arr[++i])

          if (tmp1 < 0) tmp2 = tmp1 * -1; else tmp2 = tmp1;

          if (tmp2 < minDifference) {
            minDifference = tmp2;
            index = --i;
          } else {
            --i;
          }
        }
        
        System.out.println(index);
      }
	}
}